<?php

ini_set('display_errors', 1);
error_reporting(-1);
require_once '/data/wwwroot/g_vendor/autoload.php';


$action = isset($argv[1]) ? $argv[1] : '';
try {
    switch ($action) {
        case 'payGroup':
            $order_no = isset($argv[2]) ? $argv[2] : '';
            \Biz\service\Group::payGroup($order_no);
            break;
        case 'teamid':
            $order_no = isset($argv[2]) ? $argv[2] : '';
            $uid = isset($argv[3]) ? $argv[3] : '';
            $rs = \Biz\service\Group::getTeamId($order_no, $uid);
            var_dump($rs);
            break;
        case 'goodsDetail':
            $goodsId = isset($argv[2]) ? $argv[2] : '';
            $rs = \Biz\service\Group::goodsDetail($goodsId);
            var_dump($rs);
            break;
        case 'success_send_msg':
            $success_order_no = isset($argv[2]) ? explode(',', $argv[2]) : [];
            \Biz\service\Group::success_send_msg($success_order_no);
            break;
    }
} catch (Exception $e) {
    var_dump($e->getFile());
    var_dump($e->getLine());
    var_dump($e->getMessage());
}
